using System;
using System.Collections.Generic;

namespace Net
{
    public class MessageFactoryRegistry
    {
        public static readonly Dictionary<short, Func<BaseMessage>> MessageCreators = new()
        {
            { MessageDefine.U2LS_UserRegisterRequest, () => new U2LS_UserRegisterRequest() },
            { MessageDefine.U2LS_UserLoginRequest, () => new U2LS_UserLoginRequest() },
            { MessageDefine.LS2U_UserLoginResponse, () => new LS2U_UserLoginResponse() },
            { MessageDefine.U2LS_UserUpdateInfoRequest, () => new U2LS_UserUpdateInfoRequest() },
            { MessageDefine.U2LS_UserHeartBeatRequest, () => new U2LS_UserHeartBeatRequest() },
            { MessageDefine.LS2U_UserHearBeatResponse, () => new LS2U_UserHearBeatResponse() },
            { MessageDefine.U2LS_RegisterProto, () => new U2LS_RegisterProto() },
            { MessageDefine.LS2U_Response, () => new LS2U_Response() },
            { MessageDefine.GS2U_BroadCastData, () => new GS2U_BroadCastData() },
            { MessageDefine.U2LS_Login, () => new U2LS_Login() },
            { MessageDefine.U2GS_TestRepeated, () => new U2GS_TestRepeated() },
        };
    }
}
